<?php
require "IncludeManager.php";
package("Core");
using("Client_User");
using("Resources_Catalog");

// might be nice to condense these two into a single method call
$factory = Core_Factory::getSingleton();
$junction = $factory->construct(Resources_Catalog::fetch("sample.xml"));

# create a new user
$user = new Client_User();
$user->setEmail("foo@bar.com");
$user->setPassword("password");
$user->setDate(time());
# save the user
$junction->save($user);
# now the user has an id
print_r($user);

echo "<br />";
echo "<br />";

# we can delete a user when he has an id
$junction->remove($user);
?>